import { genMessage } from '../helper';
import antdLocale from 'ant-design-vue/es/locale/ja_JP';
import vxeLocale from 'vxe-pc-ui/lib/language/ja-JP';
import { deepMerge } from '@/utils';

const modules = import.meta.glob('./ja-JP/**/*.{json,ts,js}', { eager: true });

export default {
  message: {
    ...genMessage(modules as Recordable<Recordable>, 'ja-JP'),
    ...vxeLocale,
    antdLocale: {
      ...antdLocale,
      DatePicker: deepMerge(
        antdLocale.DatePicker,
        genMessage(modules as Recordable<Recordable>, 'ja-JP').antdLocale.DatePicker,
      ),
    },
  },
};
